Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed onrequest path-related issue #292

Merged
merged 1 commit into from Nov 27, 2012
Merged

Conversation

saleyn
Copy link
Contributor

@saleyn saleyn commented Oct 18, 2012

No description provided.

@yrashk
Copy link
Contributor

yrashk commented Nov 17, 2012

I am wondering what's the exact "issue" this patch is solving?

@essen
Copy link
Member

essen commented Nov 17, 2012

Path can change in onrequest.

@@ -449,10 +449,10 @@ request(Buffer, State=#state{socket=Socket, transport=Transport,
-spec onrequest(cowboy_req:req(), #state{}, binary(), binary()) -> ok.
onrequest(Req, State=#state{onrequest=undefined}, Host, Path) ->
dispatch(Req, State, Host, Path);
onrequest(Req, State=#state{onrequest=OnRequest}, Host, Path) ->
onrequest(Req, State=#state{onrequest=OnRequest}, Host, _Path) ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of not using it here can you remove this argument entirely? I'll merge when that's done. Thanks!

@essen
Copy link
Member

essen commented Nov 27, 2012

Just a small change and it's good!

@saleyn
Copy link
Contributor Author

saleyn commented Nov 27, 2012

I am a little confused by your two comments above. Do you mean that you want me to remove the forth argument Path in the onrequest call entirely (which is a backward-compatibility issue), or that the change is good the way it is?

@essen
Copy link
Member

essen commented Nov 27, 2012

Yes, remove, there's no backward there, it's an internal function. Just remove it on the caller too.

@saleyn
Copy link
Contributor Author

saleyn commented Nov 27, 2012

ok, cool.

@saleyn
Copy link
Contributor Author

saleyn commented Nov 27, 2012

Check it now.

@essen essen merged commit d0f3372 into ninenines:master Nov 27, 2012
@essen
Copy link
Member

essen commented Nov 27, 2012

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants